package cn.ruituo.adv2;

import java.util.Scanner;

public class StudentTest {
    public static void main(String[] args) {

        System.out.println(Sex.男.toString());
        System.out.println(Sex.男.ordinal());

        Student s=new Student();
        s.setName("小吴");
        s.setAge(22);
        Scanner in=new Scanner(System.in);
        System.out.println("输入性别：");
        //s.setSex(Sex.女);
        s.setSex(Sex.valueOf(in.next()));

        System.out.println(s);
    }
}
